package Message.Public
{
    import Framework.MQ.*;
    import Framework.Serialize.*;

    public class SShopItem extends Object implements IMessageBase
    {
        public var itemCode:int;
        public var price:int;
        public var discount:int;
        public var amout:int;
        public var reserve1:int;
        public var reserve2:int;
        public const _type:int = 12;
        public static var _regist:SShopItem = new SShopItem(true);

        public function SShopItem(param1:Boolean = false)
        {
            if (param1)
            {
                MessageManager.instance().regist(this);
            }
            
        }

        public function getType() : int
        {
            return this._type;
        }

        public function clone() : IMessageBase
        {
            return new SShopItem();
        }

        public function __write(param1:SerializeStream) : void
        {
            param1.writeInt(this.itemCode);
            param1.writeInt(this.price);
            param1.writeInt(this.discount);
            param1.writeInt(this.amout);
            param1.writeInt(this.reserve1);
            param1.writeInt(this.reserve2);
            
        }

        public function __read(param1:SerializeStream) : void
        {
            this.itemCode = param1.readInt();
            this.price = param1.readInt();
            this.discount = param1.readInt();
            this.amout = param1.readInt();
            this.reserve1 = param1.readInt();
            this.reserve2 = param1.readInt();
            
        }

    }
}
